﻿<navigation:Page x:Class="PmuRegistry.Silverlight.Pages.QuickView" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"   
           xmlns:m="clr-namespace:Microsoft.Maps.MapControl;assembly=Microsoft.Maps.MapControl"
           Title="NASPI PMU Registry: Quick View">
    <Grid x:Name="GridQuickView">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>            
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        
        <Border Style="{StaticResource PortletBorderStyle}" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3">
            <StackPanel Orientation="Vertical">
                <TextBlock Text="Quick View: PMU Locations Map" Foreground="#FFFFFFFF" HorizontalAlignment="Center" FontSize="{StaticResource LargerTextSize}" Padding="0" />
                <Border Style="{StaticResource HeaderRowBorderStyle}" Height="{StaticResource XXXLargeItemSize}">
                    <m:Map x:Name="VirtualEarthMap" ZoomLevel="4">
                        <m:Map.Mode>
                            <m:AerialMode Labels="True" FadingLabels="True" />
                        </m:Map.Mode>
                        <m:Map.Children>
                            <m:MapLayer x:Name="PushpinLayer">
                            </m:MapLayer>
                        </m:Map.Children>
                    </m:Map>
                </Border>
            </StackPanel>
        </Border>
        
        <Border Height="100" Width="130" Background="Black" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,10,60">
            <Border Margin="2" BorderBrush="#FFFFFFFF" BorderThickness="1" CornerRadius="10">
                <StackPanel Orientation="Vertical" Margin="5">
                    <StackPanel Orientation="Horizontal" Height="14"> 
                        <CheckBox x:Name="CheckboxOperational" IsChecked="True"  Content="" VerticalAlignment="Center" Margin="0,0,2,0" Click="Checkbox_Click" />
                        <Ellipse Height="12" HorizontalAlignment="Left" VerticalAlignment="Top" Width="12" Fill="{StaticResource GreenRadialGradientBrush}" />
                        <TextBlock Text="Operational" Foreground="#FFFFF7F7" Margin="2,0,0,0"/>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Height="14">
                        <CheckBox x:Name="CheckboxOutofService" IsChecked="True"  Content="" VerticalAlignment="Center" Margin="0,0,2,0" Click="Checkbox_Click"/>
                        <Ellipse Height="12" HorizontalAlignment="Left"  VerticalAlignment="Top" Width="12" Fill="{StaticResource RedRadialGradientBrush}"/>
                        <TextBlock Text="Out of Service" Foreground="#FFFFF7F7" Margin="2,0,0,0"/>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Height="14">
                        <CheckBox x:Name="CheckboxValidated" IsChecked="True"  Content="" VerticalAlignment="Center" Margin="0,0,2,0" Click="Checkbox_Click"/>
                        <Ellipse  Height="12" HorizontalAlignment="Left" VerticalAlignment="Top" Width="12" Fill="{StaticResource YellowRadialGradientBrush}"/>
                        <TextBlock Text="Validated" Foreground="#FFFFF7F7" Margin="2,0,0,0"/>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Height="14">
                        <CheckBox x:Name="CheckboxInProgress" IsChecked="False"  Content="" VerticalAlignment="Center" Margin="0,0,2,0" Click="Checkbox_Click"/>
                        <Ellipse  Height="12" HorizontalAlignment="Left" VerticalAlignment="Top" Width="12" Fill="{StaticResource BlueRadialGradientBrush}"/>
                        <TextBlock Text="In Progress" Foreground="#FFFFF7F7" Margin="2,0,0,0"/>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Height="14">
                        <CheckBox x:Name="CheckboxPlanned" IsChecked="False"  Content="" VerticalAlignment="Center" Margin="0,0,2,0" Click="Checkbox_Click"/>
                        <Ellipse  Height="12" HorizontalAlignment="Left" VerticalAlignment="Top" Width="12" Fill="{StaticResource WhiteRadialGradientBrush}"/>
                        <TextBlock Text="Planned" Foreground="#FFFFF7F7" Margin="2,0,0,0"/>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Height="14">
                        <CheckBox x:Name="CheckboxRetired" IsChecked="False"  Content="" VerticalAlignment="Center" Margin="0,0,2,0" Click="Checkbox_Click"/>
                        <Ellipse  Height="12" HorizontalAlignment="Left" VerticalAlignment="Top" Width="12" Fill="{StaticResource GrayRadialGradientBrush}"/>
                        <TextBlock Text="Retired" Foreground="#FFFFF7F7" Margin="2,0,0,0"/>
                    </StackPanel>
                </StackPanel>
            </Border>
        </Border>
        
        <Border Grid.Row="1" Grid.Column="0" Style="{StaticResource PortletBorderStyle}" VerticalAlignment="Stretch" Margin="1">
            <StackPanel Orientation="Vertical" Margin="0">
                <TextBlock Text="PMU Count" Style="{StaticResource LargeWhiteTextStyle}" HorizontalAlignment="Center" Padding="0" />
                <Border Background="{StaticResource PortletBackgroundBrush}">
                    <Image Source="../Images/PmuRegistryChart.png" Margin="0,-5,0,0" />
                </Border>
            </StackPanel>
        </Border>
        
        <Border Grid.Row="1" Grid.Column="1" Style="{StaticResource PortletBorderStyle}" VerticalAlignment="Stretch" Margin="1">
            <StackPanel Orientation="Vertical" Margin="0">
                <TextBlock Text="Recently Added" Style="{StaticResource LargeWhiteTextStyle}" HorizontalAlignment="Center" Padding="0" />
                <Border Background="{StaticResource PortletBackgroundBrush}">
                    <ListBox x:Name="ListBoxRecentlyAdded" Margin="0" Padding="0" Background="Transparent" BorderThickness="0">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <Border Style="{StaticResource ContentRowCellBorderStyle}">
                                        <HyperlinkButton Content="{Binding Path=Acronym}" Tag="{Binding Path=ID}" Foreground="#FF095188" Width="{StaticResource SmallItemSize}" Click="HyperlinkButton_Click" />
                                    </Border>
                                    <Border Style="{StaticResource ContentRowCellBorderStyle}">
                                        <TextBlock Text="{Binding Path=CreatedOn}" Width="{StaticResource LargeItemSize}" TextAlignment="Right" Padding="0"/>
                                    </Border>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Border>
            </StackPanel>
        </Border>
        
        <Border Grid.Row="1" Grid.Column="2" Style="{StaticResource PortletBorderStyle}" VerticalAlignment="Stretch" Margin="1">
            <StackPanel Orientation="Vertical" Margin="0">
                <TextBlock Text="Operational Stats" Style="{StaticResource LargeWhiteTextStyle}" HorizontalAlignment="Center" Padding="0" />
                <Border Background="{StaticResource PortletBackgroundBrush}">
                    <StackPanel Orientation="Vertical">
                        <TextBlock Text="Reporting PMUs" FontWeight="Bold" Padding="5" />
                        <ListBox x:Name="ListBoxReportingStats" Margin="0" Padding="0" Background="Transparent" BorderThickness="0">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <Border Style="{StaticResource ContentRowCellBorderStyle}">
                                            <TextBlock Text="{Binding Path=Key}" Width="{StaticResource SmallItemSize}"/>
                                        </Border>
                                        <Border Style="{StaticResource ContentRowCellBorderStyle}">
                                            <TextBlock Text="{Binding Path=Value}" TextAlignment="Right" Width="{StaticResource LargeItemSize}"/>
                                        </Border>
                                    </StackPanel>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                        <TextBlock Text="Planned PMUs" FontWeight="Bold" Padding="5" />
                        <ListBox x:Name="ListBoxPlannedStats" Margin="0" Padding="0" Background="Transparent" BorderThickness="0">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <Border Style="{StaticResource ContentRowCellBorderStyle}">
                                            <TextBlock Text="{Binding Path=Key}" Width="{StaticResource SmallItemSize}"/>
                                        </Border>
                                        <Border Style="{StaticResource ContentRowCellBorderStyle}">
                                            <TextBlock Text="{Binding Path=Value}" Width="{StaticResource LargeItemSize}" TextAlignment="Right"/>
                                        </Border>
                                    </StackPanel>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                    </StackPanel>
                </Border>
            </StackPanel>
        </Border>
    </Grid>
</navigation:Page>
